#include "WebSocket/TcpSocket.h"
#include "WebSocket/Thread.h"

int main()
{

    TcpSocket::Desc desc;
    desc.port=1234;
    desc.host="127.0.0.1";

    TcpSocket tcpSocket;
    tcpSocket.Create(desc);
    struct Buffer{
        int no;
    } buffer;

    while(1)
    {
        tcpSocket.Send<Buffer>(buffer);
        std::this_thread::sleep_for(std::chrono::milliseconds(250));
        LOGD("Send buffer %d", buffer.no++);
    }
    tcpSocket.Close();
    LOGI("end tcp client");
    
};
